<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
$return=array();
/*******basic*******/
if($_RQ['op']=='basic'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$this->plugin_setting('basic',$postdata);
		exi('设置成功');
	}
	$footernav =array(
		array('title'=>'首页','icon'=>'icon-shouye','action'=>'jy_buhuo/index/'),
		array('title'=>'我的','icon'=>'icon-wo1','action'=>'jy_buhuo/myhome/'),
	);
	$return['item']=$this->plugin_setting('basic');
	$return['item']['footernav']=$return['item']['footernav']?$return['item']['footernav']:$footernav;
	$jy_commission=pdo_getcolumn('core_plugins',array('name'=>'jy_commission'),'title');
	if(!$jy_commission){
		$tip='[温馨提示]：<red>您还未安装，基础插件，无法正常使用！</red>';
	}else{
		$tip='[温馨提示]：开启后：<red>如果上级没有补货库存，该上级《'.$jy_commission.'》将不再获得任何分销收益</red>！';
	}
	$htmls=array(
		'type'=>'edit',
		'desc'=>'参数设置',
		'edit_tab'=>true,
		'edits'=>array(
			array(
				'title'=>'基本信息',
				'list'=>array(
					array('type'=>'tip','title'=>$tip),
					array('type'=>'switch','title'=>'是否开启','name'=>'isopen','isradio'=>1),
					array('type'=>'string','title'=>'网站名称','name'=>'title'),
					array('type'=>'image','title'=>'网站logo','name'=>'logo'),
					array('type'=>'string','title'=>'分享标题','name'=>'share_title'),
					array('type'=>'image','title'=>'分享图片','name'=>'share_image'),
					array('type'=>'string','title'=>'分享描述','name'=>'share_desc'),
				)
			),
		),
	);
	$return['htmls']=$htmls;
	exi($return);
}
/*******basic*******/
/*******op*******/
